import { Injectable } from "@nestjs/common";
// import { InjectRepository } from "@nestjs/typeorm";
// import { Repository } from "typeorm";
// import { UserEntity } from "../entities/user.entity";


@Injectable()
export class UserService {
  // constructor(@InjectRepository(UserEntity) private userRepository: Repository<UserEntity>) {
  // }
  constructor() {
  }

  async findList() {
    // return this.userRepository.findAndCount();
    return { code:0, data:[], message:"list获取成功" };
  }

  async find(id:string) {
    // return this.userRepository.findOneBy({ id })
    return { code:0, data:{}, message:`${id}获取成功` };
  }

  async save(saveDto) {
    // return this.userRepository.save(saveDto)
    return { code:0, data:saveDto, message:"save成功" };
  }

  async delete(id:string) {
    // return this.userRepository.delete(id);
    return { code:0, data:id, message:"delete成功" };
  }
}